import request from "./request";

export const addPaper = (data) => request({
    method:'post',
    url:'/papers',
    data,
}) 

export const getPapers = (data) => request({
    method:'get',
    url:'/papers',
    data,
})
// 定义获取单个大纲接口 (数据回填)
export const getPaper = (id) => request({
    method:'get',
    url:`/papers/${id}`,
})

// 定义编辑大纲接口
export const editPaper = (id,e) => request({
    method:'put',
    url:`/papers/${id}`,
    data:e,
})

// 定义删除大纲接口
export const delPaper = (id) => request({
    method:'delete',
    url:`/papers/${id}`,
})


export const exist = (params) => request({
    method:'get',
    url:'/papers/exist',
    params,
})